﻿<%@ Page Language="c#" CodeBehind="Listview.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.UnitiveDocument.DocumentFlowPages.ListViewPage" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
  <title>文档流转 - 流程管理</title>
  <uds:Style runat="server" Href="~/css/BasicLayout.css" />
  <script language="javascript">
    //<!--
    function delete_confirm(e) {
      if (event.srcElement.outerText == "删除")
        event.returnValue = confirm("您确认要删除?");
    }
    document.onclick = delete_confirm;
    //-->
  </script>
</head>
<body>
  <form id="Listview" method="post" runat="server">
    <uds:PageTitle runat="server" HintImage="~/DataImages/DocFlow.gif" Title="文档流转">
      <uds:RedirectButton runat="server" CssClass="redbuttoncss optionbutton" Text="新建流程" RedirectUrl="EditFlow.aspx?FlowID=0" />
      <uds:RedirectButton runat="server" CssClass="redbuttoncss optionbutton" Text="表单管理" RedirectUrl="ManageStyle.aspx" />
    </uds:PageTitle>
    <div>
      <table cellspacing="0" cellpadding="0" border="0" style="margin-top: 8px;">
        <tr>
          <td class="unselectedTab"><a href="ListDocument.aspx?DisplayType=1" class="Newbutton">我的批阅</a></td>
          <td class="unselectedTab"><a href="ListDocument.aspx?DisplayType=2" class="Newbutton">我的申请</a> </td>
          <td class="unselectedTab"><a href="ListDocument.aspx?DisplayType=3" class="Newbutton">已经批阅</a> </td>
          <td class="unselectedTab"><a href="DraftList.aspx" class="Newbutton">拟稿箱</a> </td>
          <%if (ManageFlow)
            {%>
          <td class="selectedTab"><a href="javascript:void(0);" class="Newbutton">流程管理</a></td>
          <%}%>
        </tr>
      </table>
    </div>
    <uds:UDSDataGrid ID="dgFlowList" runat="server" OnPageIndexChanged="DataGrid_PageChanged" DataKeyField="ID" OnDeleteCommand="MyDataGrid_Delete">
      <Columns>
        <asp:HyperLinkColumn DataNavigateUrlField="ID" DataNavigateUrlFormatString="ManageFlow.aspx?FlowID={0}" DataTextField="Name" HeaderText="流程名">
          <HeaderStyle Width="15%" />
        </asp:HyperLinkColumn>
        <asp:BoundColumn DataField="Description" HeaderText="流程简介">
          <HeaderStyle Width="30%" />
        </asp:BoundColumn>
        <asp:TemplateColumn HeaderText="流程图例">
          <HeaderStyle HorizontalAlign="Center" Width="10%" />
          <ItemStyle HorizontalAlign="Center" />
          <ItemTemplate>
            <a href="DisplayFlow.aspx?FlowID=<%# ((Flow)Container.DataItem).ID %>">图例</a>
          </ItemTemplate>
        </asp:TemplateColumn>
        <asp:HyperLinkColumn DataNavigateUrlField="StyleID" DataNavigateUrlFormatString="DisplayStyle.aspx?StyleID={0}" DataTextField="StyleName" HeaderText="表格/附件">
          <HeaderStyle HorizontalAlign="Center" Width="10%" />
          <ItemStyle HorizontalAlign="Center" />
        </asp:HyperLinkColumn>
        <asp:BoundColumn DataField="TimeCreated" HeaderText="建立时间" DataFormatString="{0:yyyy/MM/dd}">
          <HeaderStyle HorizontalAlign="Center" Width="10%" />
          <ItemStyle HorizontalAlign="Center" />
        </asp:BoundColumn>
        <asp:TemplateColumn HeaderText="编辑">
          <HeaderStyle HorizontalAlign="Center" Width="6%" />
          <ItemStyle HorizontalAlign="Center" />
          <ItemTemplate>
            <a href='EditFlow.aspx?FlowID=<%# ((Flow)Container.DataItem).ID %>'>编辑</a>
          </ItemTemplate>
          <EditItemTemplate>
          </EditItemTemplate>
        </asp:TemplateColumn>
        <asp:ButtonColumn Text="删除" HeaderText="删除" CommandName="Delete">
          <HeaderStyle HorizontalAlign="Center" Width="6%" />
          <ItemStyle HorizontalAlign="Center" />
        </asp:ButtonColumn>
      </Columns>
    </uds:UDSDataGrid>
  </form>
</body>
</html>
